package com.gxwy.upanyonghu.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.gxwy.upanyonghu.dao.UpanYongHuDao;
import com.gxwy.upanyonghu.form.UpanYongHu;

@Service
public class UpanYongHuServiceImpl implements UpanYongHuService {

	@Autowired
	private UpanYongHuDao dao;
	
	@Transactional
	public UpanYongHu findUpanYongHu(String username) {
		return dao.findUpanYongHu(username);
	}

	@Transactional
	public void updateDengLuShiJian(UpanYongHu user) {
		dao.updateDengLuShiJian(user);
		
	}

	@Transactional
	public void updatePassword(UpanYongHu uyh) {
		dao.updatePassword(uyh);
		
	}


	@Transactional
	public void save(UpanYongHu contact) {
		// TODO Auto-generated method stub
	         dao.save(contact);
	}
	@Transactional
	public void Update(UpanYongHu contact, Integer id) {
		// TODO Auto-generated method stub
		     dao.Update(contact, id);
	}
	@Transactional
	public void Delete(Integer id) {
		// TODO Auto-generated method stub
		dao.Delete(id);
	}
	@Transactional
	public List<UpanYongHu> findAll() {
		
		// TODO Auto-generated method stub
		return dao.findAll();
	}
   
}
